#ifndef _SPEED_H_
#define _SPEED_H_

#define DRV8701 1
#ifdef DRV8701//8701驱动
#define MOTOR_L_EN          P21_3
#define MOTOR_L_PH          ATOM1_CH0_P21_2

#define MOTOR_R_EN          P21_5
#define MOTOR_R_PH          ATOM1_CH2_P21_4

void speed_test(void);
#else//其他驱动
//有刷的初始化引脚宏定义
#define MOTOR_LEFT_POSITIVE_PIN     ATOM1_CH3_P21_5   //�����������Ŷ���
#define MOTOR_LEFT_NEGATIVE_PIN     ATOM1_CH2_P21_4   //�����������Ŷ���
#define MOTOR_RIGHT_POSITIVE_PIN    ATOM1_CH1_P21_3   //�ҵ���������Ŷ���
#define MOTOR_RIGHT_NEGATIVE_PIN    ATOM1_CH0_P21_2   //�ҵ���������Ŷ���
#endif

//无刷的初始化引脚宏定义
#define MOTR_LEFT_WUSHA_PIN         ATOM1_CH4_P02_4
#define MOTR_RIGHT_WUSHA_PIN        ATOM1_CH5_P02_5


void Speed_Init(void);

void Speed_Out(int Left,int Right);
void Speed_MachineControl(void);



#endif
